for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
/** global: GLSR, jQuery */
;(function( x ) {
'use strict';
var Pointers = function() {
x.each( GLSR.pointers, function( i, pointer ) {
this.init_( pointer );
}.bind( this ));
};
Pointers.prototype = {
/** @return void */
close_: function( pointerId ) { // string
x.post( GLSR.ajaxurl, {
pointer: pointerId,
action: 'dismiss-wp-pointer',
});
},
init_: function( pointer ) { // object
x( pointer.target ).pointer({
content: pointer.options.content,
position: pointer.options.position,
close: this.close_.bind( pointer.id ),
})
.pointer( 'open' )
.pointer( 'sendToTop' );
x( document ).on( 'wp-window-resized', function() {
x( pointer.target ).pointer( 'reposition' );
GLSR.Pointers = Pointers;
})( jQuery );